﻿// $Id: Configuration.cs 10 2008-02-29 15:58:02Z mcartoixa $

/* ***************************************************************************
 *                                                                           *
 * Copyright © 2007 NourY Solutions                                          *
 *                                                                           *
 * This file is part of DataRules.                                           *
 *                                                                           *
 * DataRules is free software; you can redistribute it and/or modify it      *
 * under the terms of the GNU Lesser General Public License as published     *
 * by the Free Software Foundation; either version 3 of the License, or      *
 * (at your option) any later version.                                       *
 *                                                                           *
 * DataRules is distributed in the hope that it will be useful, but          *
 * WITHOUT ANY WARRANTY; without even the implied warranty of                *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU          *
 * Lesser General Public License for more details.                           *
 *                                                                           *
 * You should have received a copy of the GNU Lesser General Public          *
 * License along with this program.  If not, see                             *
 * <http://www.gnu.org/licenses/lgpl.html>.                                  *
 *                                                                           *
 *************************************************************************** */

/*! \file
 * \brief Assembly configuration information.
 *
 * \author $Author: mcartoixa $
 * \date $Date: 2008-02-29 16:58:02 +0100 (ven., 29 févr. 2008) $
 * \version $Revision: 10 $
 */

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;

namespace Salamanca.DataRules
{
    internal class Configuration
    {
        private Configuration()
        {
        }

        public static Configuration Instance
        {
            get
            {
                if (_Instance==null)
                    _Instance=new Configuration();
                return _Instance;
            }
        }

#if (!NET_CF)
        public static TraceSwitch Switch=new TraceSwitch("Salamanca.DataRules", "", _DefaultTraceLevel);
#else
        public static TraceSwitch Switch;
#endif

        private static Configuration _Instance;

#if DEBUG
        private const string _DefaultTraceLevel="3"; // Info
#else
        private const string _DefaultTraceLevel="0"; // Off
#endif
    }
}
